package com.eagle.depthinspringboot.configuration.bootstrapt;

import com.eagle.depthinspringboot.configuration.annotation.EnableHelloWord;
import org.springframework.boot.WebApplicationType;
import org.springframework.boot.builder.SpringApplicationBuilder;
import org.springframework.context.ConfigurableApplicationContext;

@EnableHelloWord
public class EnableHelloWorldBootstrap {
	public static void main(String[] args) {
		ConfigurableApplicationContext ctx = new SpringApplicationBuilder(EnableHelloWorldBootstrap.class)
				.web(WebApplicationType.NONE)
				.run(args);
		String helloWorld = ctx.getBean("helloWorld", String.class);
		System.out.println("hello world bean: "+helloWorld);
	}
}
